<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/2/25
  Time: 16:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<a href="${pageContext.request.contextPath}/addJar.jsp" >添加Jar包</a>
    <table border="1" align="center">

<%--        添加jsp思路 添加完跳转到查询所有--%>
        <tr>
            <td>id</td>
            <td>Jar包名</td>
            <td>Jar包大小</td>
            <td>Jar包介绍</td>
            <td>Jar包文件名</td>
            <td>操作</td>
        </tr>
        <c:forEach items="${requestScope.jars}" var="jar">
        <tr>
            <td>${jar.id}</td>
            <td>${jar.name}</td>
            <td>${jar.size}</td>
            <td>${jar.description}</td>
            <td>${jar.fileName}</td>
            <td><a href="${pageContext.request.contextPath}/downloadJAR.do?fileName=${jar.fileName}&name=${jar.name}">download</a></td>

        </tr>
        </c:forEach>
        <tr>
            <td colspan="5" align="center">
<%--                点击导出，就以下载文件的方式到下载文件夹下载excel表格--%>
                <a href="${pageContext.request.contextPath}/exportExcel.do">导出</a>
                <a href="${pageContext.request.contextPath}/addBatch.jsp">导入</a>
            </td>
        </tr>
    </table>
</body>
</html>
